package biz.impl;

import java.util.List;

import entity.Topic;
import biz.TopicBiz;
import dao.TopicDao;
import dao.impl.TopicDaoImpl;

public class TopicBizImpl implements TopicBiz{
	private TopicDao topicDao = new TopicDaoImpl();
	
	public Topic findTopic(int topicId){
		return topicDao.findTopic(topicId); 
	}
	public List<Topic> findListTopic(int page,int boardId){
		return topicDao.findListTopic(page, boardId);
	}
	public int addTopic(Topic topic){
		return topicDao.addTopic(topic);
	}
	public int deleteTopic(int topicId){
		return topicDao.deleteTopic(topicId);
	}
	public int updateTopic(Topic topic) throws Exception{
		return topicDao.updateTopic(topic);
	}
	public int findCountTopic(int boardId){
		return topicDao.findCountTopic(boardId);
	}
}
